package zero.tech.core.snow;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import zero.tech.core.util.RandomUtil;
@Component
public class SnowIdUtil {
	@Autowired(required = false)
	private SnowFlake snowFlake;

	public String createId(Object... params) {
		String str = "" + snowFlake.nextId()+RandomUtil.randInt(1000000, 9999999);
		for (Object param : params) {
			str += "-" + param.toString();
		}
		return str;
	}
}
